{% extends 'base.html' %}

{% block title %}
	{{ page }}
{% endblock %}

{% block menu %}
	<div class="menu">
	<table id="main_menu">
	<tr>
	{% for key, value in menus.items() %}
		<td>
		<a href= "{{url_for(key)}}" >
            <h2>{{ value }}</h2>
        </a>
		</td>
	{% endfor %}
	</tr>
	</table>
	</div>
{% endblock %}

{% block container %}
	<div class="container">
    	<h1> {{ page }} </h1>
	</div>
{% endblock %}

{% block content %}
<div class="form">
<p> {{ text }} </p><br>
<p>Добавить устройство</p>
<form method="post">
{{ addDev.csrf_token() }}
    <div>
	{{ addDev.name_device.label }}
	{{ addDev.name_device }}
	<br>
	{{ addDev.mode_device.label }}
	{{ addDev.mode_device }}
	<br>
	{{ addDev.first_channel.label }}
	{{ addDev.first_channel }}
	<br>
	{{ addDev.max_channel.label }}
	{{ addDev.max_channel }}
    </div>
    <div>
	{{ addDev.save_dev}}
    </div>
</form><br><hr>
<form method="post">
{{ addDev.csrf_token() }}
    <div>
	{{ delDev.name_device.label }}
	{{ delDev.name_device }}
    </div>
    <div>
	{{ delDev.del_dev}}
    </div>
</form>
</div>
{% endblock %}

{% block foot %}
	<div class="foot">
		<a>
		{% for txt in foot %}
			{{ txt }}
			<br>
		{% endfor %}
		</a>
		<a href="{{ url }}" target="_blank">Сайт проекта</a>
	</div>
{% endblock %}

